package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 移位
 * </p>
 *
 * @author LEO
 * @since 2020-08-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("wms_move")
@ApiModel(value="Move对象", description="移位")
public class Move extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "移位单号")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "仓库")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "下发状态:0未下发，1已下发；")
    @TableField("is_issue")
    private Integer issue;

    @ApiModelProperty(value = "状态   0 新增 1待审核 2审核通过 3 驳回 4作废")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    @Length(max = 100, message = "备注长度不能大于100个字符", groups = {Move.Save.class, Move.Update.class})
    private String remarks;

    @ApiModelProperty(value = "审核意见")
    @TableField("audit_mind")
    private String auditMind;

    @ApiModelProperty(value = "所属机构Code")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "明细")
    @TableField(exist = false)
    List<MoveItem> moveItemVOList = new ArrayList<>();

    public interface Save{}
    public interface Update{}
}
